package com.aspose.cells;

public class TableStyleElement {
   private TableStyleElementCollection b;
   private int c = 1;
   private int d;
   private Style e;
   int a = -1;

   TableStyleElement(TableStyleElementCollection parent, int type) {
      this.b = parent;
      this.d = type;
   }

   void a(TableStyleElement var1) {
      this.c = var1.c;
      this.d = var1.d;
      if (var1.a != -1 && this.b() != var1.b()) {
         this.a = this.b().getDxfs().a(var1.getElementStyle());
      } else {
         this.a = var1.a;
      }

   }

   private WorksheetCollection b() {
      return this.b.a().a().c();
   }

   public int getSize() {
      return this.c;
   }

   public void setSize(int value) {
      this.c = value;
   }

   public int getType() {
      return this.d;
   }

   public Style getElementStyle() {
      Style var1 = new Style(this.b());
      if (this.e != null) {
         var1.copy(this.e);
         return var1;
      } else if (this.a == -1) {
         return var1;
      } else {
         Style var2 = this.b().getDxfs().get(this.a);
         var1.copy(var2);
         return var1;
      }
   }

   public void setElementStyle(Style style) {
      this.e = style;
      this.a = this.b().getDxfs().a(style);
   }

   Style a() {
      if (this.e == null) {
         return this.a == -1 ? null : this.b().getDxfs().get(this.a);
      } else {
         return this.e;
      }
   }

   void a(Style var1) {
      this.e = var1;
      this.a = this.b().getDxfs().a(var1);
   }
}
